home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-04
/
aie9003.zip
/
XOR2.ARI
< prev
Wrap
Text File
|
1989-12-28
|
2KB
|
113 lines
%%%%%%%%%%%% training data for exclusive or %%%%%%%%%%%%%%%%%%%%%%%%%
number_data_items( 16 ).
input( 0 , 1, 0 ).
input( 0 , 2, 0 ).
input( 1 , 1, 1 ).
input( 1 , 2, 1 ).
input( 2 , 1, 1 ).
input( 2 , 2, 0 ).
input( 3 , 1, 0 ).
input( 3 , 2, 1 ).
input( 4 , 1, 0 ).
input( 4 , 2, 0 ).
input( 5 , 1, 1 ).
input( 5 , 2, 1 ).
input( 6 , 1, 1 ).
input( 6 , 2, 0 ).
input( 7 , 1, 0 ).
input( 7 , 2, 1 ).
input( 8 , 1, 0 ).
input( 8 , 2, 0 ).
input( 9 , 1, 1 ).
input( 9 , 2, 1 ).
input( 10 , 1, 1 ).
input( 10 , 2, 0 ).
input( 11 , 1, 0 ).
input( 11 , 2, 1 ).
input( 12 , 1, 0 ).
input( 12 , 2, 0 ).
input( 13 , 1, 1 ).
input( 13 , 2, 1 ).
input( 14 , 1, 1 ).
input( 14 , 2, 0 ).
input( 15 , 1, 0 ).
input( 15 , 2, 1 ).
output( 0 , 9, 0 ).
output( 1 , 9, 0 ).
output( 2 , 9, 1 ).
output( 3 , 9, 1 ).
output( 4 , 9, 0 ).
output( 5 , 9, 1 ).
output( 6 , 9, 1 ).
output( 7 , 9, 1 ).
output( 8 , 9, 0 ).
output( 9 , 9, 0 ).
output( 10 , 9, 1 ).
output( 11 , 9, 1 ).
output( 12 , 9, 0 ).
output( 13 , 9, 0 ).
output( 14 , 9, 1 ).
output( 15 , 9, 1 ).
%%%%%%%%%%%% network for exclusive or %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
neuron( input , 1 , $A$ ).
neuron( input , 2 , $B$ ).
neuron( not(1) , 3 , $-A$ ).
neuron( not(2) , 4 , $-B$ ).
neuron( and , 5 , $A and B$ ).
neuron( and , 6 , $A and -B$ ).
neuron( and , 7 , $-A and B$ ).
neuron( and , 8 , $-A and -B$ ).
neuron( or , 9 , $A exc B$ ).
state( edge, and, 1 , 5, 0, 1).
state( edge, and, 2 , 5, 0, 1).
state( edge, and, 3 , 5, 0, 0).
state( edge, and, 4 , 5, 0, 0).
state( edge, and, 1 , 6, 0, 1).
state( edge, and, 2 , 6, 0, 0).
state( edge, and, 3 , 6, 0, 0).
state( edge, and, 4 , 6, 0, 1).
state( edge, and, 1 , 7, 0, 0).
state( edge, and, 2 , 7, 0, 1).
state( edge, and, 3 , 7, 0, 1).
state( edge, and, 4 , 7, 0, 0).
state( edge, and, 1 , 8, 0, 0).
state( edge, and, 2 , 8, 0, 0).
state( edge, and, 3 , 8, 0, 1).
state( edge, and, 4 , 8, 0, 1).
state( edge, or , 5 , 9, 0, 1).
state( edge, or , 6 , 9, 0, 1).
state( edge, or , 7 , 9, 0, 1).
state( edge, or , 8 , 9, 0, 1).